/*
 * @Description:
 * @Author: zhaolei
 * @Date: 2023-05-25 15:10:40
 */
import { ARTICLE_STATUS_LIST } from '@/const/type';
export const tableOption = () => {
  return {
    ...window.$crudMixins.tableOptions,
    addBtn: false,
    editBtn: false,
    delBtn: false,
    menuWidth: 180,
    searchLabelWidth: 130,
    labelWidth: 130,
    viewBtn: false,
    // viewTitle,
    column: [
      {
        label: '文章标题',
        prop: 'title',
        search: true,
      },
      {
        type: 'select',
        label: '文章状态',
        prop: 'status',
        search: true,
        dicData: ARTICLE_STATUS_LIST,
      },
      {
        label: '文章标签',
        prop: 'label',
        row: true,
        type: 'select',
        dicUrl: '/admin/dict/type/article_tag',
        multiple: true,
      },
      {
        label: '点击量',
        prop: 'clickQty',
      },
      {
        label: '点赞量',
        prop: 'likeQty',
      },
      {
        label: '账号',
        prop: 'userName',
        search: true,
      },
      {
        label: '创建时间',
        prop: 'createTime',
        type: 'datetime',
        width: 160,
        format: 'yyyy-MM-dd HH:mm:ss',
        valueFormat: 'yyyy-MM-dd HH:mm:ss',
        search: true,
        searchRange: true,
      },
      {
        label: '发布时间',
        prop: 'releaseTime',
        type: 'datetime',
        width: 160,
        format: 'yyyy-MM-dd HH:mm:ss',
        valueFormat: 'yyyy-MM-dd HH:mm:ss',
      },
    ],
  };
};
